{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Importing the images into this script"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "False\n",
      "81\n"
     ]
    }
   ],
   "source": [
    "import os\n",
    "import numpy as np\n",
    "\n",
    "directory = 'C:/Users/joaovitor/Desktop/Meu_Canal/DINO/'\n",
    "jump_img = os.listdir(os.path.join(directory, 'jump'))\n",
    "nojump_img = os.listdir(os.path.join(directory, 'no_jump'))\n",
    "\n",
    "#checking if the number of images in both directories are equals\n",
    "print(len(jump_img) == len(nojump_img))\n",
    "print(len(jump_img))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Storing the images array into lists"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[[0 0 0 ... 0 0 0]\n",
      " [0 0 0 ... 0 0 0]\n",
      " [0 0 0 ... 0 0 0]\n",
      " ...\n",
      " [0 0 0 ... 0 0 0]\n",
      " [0 0 0 ... 0 0 0]\n",
      " [0 0 0 ... 0 0 0]]\n",
      "==================================================\n",
      "Images Dimensions: (480, 640)\n"
     ]
    }
   ],
   "source": [
    "import cv2\n",
    "\n",
    "imgs_list_jump = []\n",
    "imgs_list_nojump = []\n",
    "\n",
    "for img in jump_img:\n",
    "    images = cv2.imread(os.path.join(directory, 'jump', img), 0) #0 to convert the image to grayscale\n",
    "    imgs_list_jump.append(images)\n",
    "    \n",
    "for img in nojump_img:\n",
    "    images = cv2.imread(os.path.join(directory, 'no_jump', img), 0) #0 to convert the image to grayscale\n",
    "    imgs_list_nojump.append(images) \n",
    "\n",
    "#Taking a look at the first img of array_imgs_jump list\n",
    "print(imgs_list_jump[0])\n",
    "print(50*'=')\n",
    "print('Images Dimensions:', imgs_list_jump[0].shape)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Let's display the first image"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAUoAAAD8CAYAAAARze3ZAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/d3fzzAAAACXBIWXMAAAsTAAALEwEAmpwYAAAjhUlEQVR4nO3deXBU553u8e+vWxtCOyAkJCGEhIzBZglgG4wAbzExdhzPjFOYmCKTxaksNUnuncxgTyapjCtVdiaT8SSpZMaV8Y2nbI/LjonB2xAK4wUDMWADRmAMXIEkNgFiERJa+71/qMUVRtAt1Hs/n6qu7j799jk/bY9On3Pe9zXnHCIicnmeaBcgIhLrFJQiIgEoKEVEAlBQiogEoKAUEQlAQSkiEkDYgtLMFprZHjPbZ2bLw7UdEZFws3BcR2lmXuAT4A6gEdgMPOCc2xXyjYmIhFm49ihvAPY55/6vc64TeB64N0zbEhEJq5QwrbcEaOj3vBG48XKNzUzdg0Qk2k4450YN9EK4gtIGWHZRGJrZQ8BDYdq+iMhgHbzcC+EKykagrN/zUuBw/wbOuSeBJ0F7lCIS28J1jHIzMMHMKswsDVgMrArTtkREwiose5TOuW4z+w6wGvACTznnasOxLRGRcAvL5UGDLkIfvUUk+rY652YO9IJ65oiIBKCgFBEJQEEpIhKAglJEJAAFpYhIAApKEZEAFJQiIgEoKEVEAlBQiogEoKAUEQlAQSkiEoCCUkQkAAWliEgACkoRkQAUlCIiASgoRUQCUFCKiASgoBQRCUBBKSISgIJSRCQABaWISAAKShGRABSUIiIBKChFRAJQUIqIBKCgFBEJQEEpIhKAglJEJAAFpYhIAApKEZEAFJQiIgEoKEVEAlBQiogEoKAUEQlAQSkiEoCCUkQkgIBBaWZPmVmTme3st6zAzNaY2V7/fX6/1x42s31mtsfM7gxX4SIikRLMHuXvgYWfWrYcWOucmwC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W5pitZBSzzP15G7zHAvuWLzSzdzCqACcD7kS7Oeie9+U9gt3PuF/1eivW6R5lZnv/xMOB24GNiuG7n3MPOuVLn3Dh6f2/fdM49GMs1m9lwM8vuewx8FtgZyzUDOOeOAg1mdo1/0W3ALiJZd6QPzA5woPYues/O7gf+Idr19Kvrv4EjQBe9/6G+Coyg9+D9Xv99Qb/2/+D/GvYAn4tSzXPp/YixA9jmv90VB3VPAT70170T+JF/eUzX3a+WBfz/kzkxWzO9x/q2+2+1fX9vsVxzvzqmAVv8vyMvA/mRrFs9c0REAoj2R28RkZinoBQRCUBBKSISgIJSRCQABaWISAAKShGRABSUIiIBKChFRAL4f2jJyL35ZpliAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "import matplotlib.pyplot as plt\n",
    "\n",
    "img = cv2.cvtColor(imgs_list_jump[0], cv2.COLOR_BGR2RGB)\n",
    "plt.imshow(img)\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## The images have 480 pixels height and 640 pixels width"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "(480, 640)\n"
     ]
    }
   ],
   "source": [
    "print(imgs_list_jump[0].shape)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## The images sizes still very big, so we are going to resize all images in order to make them smaller"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Original size: 307200\n"
     ]
    }
   ],
   "source": [
    "print('Original size:', imgs_list_jump[0].size) #original size"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## We will apply the code bellow to all images"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Original Dimensions: (480, 640)\n",
      "Resized Dimensions: (96, 128)\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAUQAAAD7CAYAAAASAe3SAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/d3fzzAAAACXBIWXMAAAsTAAALEwEAmpwYAAAjX0lEQVR4nO3da4yk2V3f8e//eZ566t636Z7Lemb24l0wzhIusiJjUGThkBhiYfLCyCiWNgFp35BgCBLY4QXKi0hIQQhe5KIVNytYgGWceIUUwFpAyiubNVhkL96b2dmd3Z7pnulb3aueek5e9HMe98x0z/Sluruq+veRRj1V1V11uqfrN+c855z/MeccIiICwWk3QERkXCgQRUQyCkQRkYwCUUQko0AUEckoEEVEMkcKRDP7qJm9Ymavm9lnRtUoEZHTYIddh2hmIfAq8CPAdeBvgJ9yzr00uuaJiJyc6Ahf+0+A151z3wIwsz8CPg7sGYhmplXgInLabjnnlnZ74ChD5vcAb++4fT277w5m9rSZPW9mzx/htURERuXaXg8cpYdou9x3Tw/QOfcM8Ayohygi4+0oPcTrwJUdty8D7x6tOSIip+cogfg3wBNm9qiZxcAngWdH0ywRkZN36CGzcy4xs38H/DkQAr/rnHtxZC0TETlhh152c6gX0zVEETl9X3fOfWC3B7RTRUQko0AUEckoEEVEMgpEEZGMAlFEJKNAFBHJKBBFRDIKRBGRjAJRRCSjQBQRySgQRUQyCkQRkYwCUUQko0AUEckoEEVEMgpEEZGMAlFEJKNAFBHJKBBFRDIKRBGRjAJRRCSjQBQRySgQRUQyCkQRkYwCUUQko0AUEckoEEVEMgpEEZGMAlFEJKNAFBHJKBBFRDIKRBGRjAJRRCSjQBQRySgQRUQyCkQRkYwCUUQk88BANLMrZvZXZvaymb1oZp/O7l8ws6+Y2WvZx/njb66IyPHZT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wJeADzH+7Ya92zjW700zewr4GPCvXTY+5pjafJKB+DfAE2b2qJnFbF8QffYEX39fzMyA3wFeds79xo6HngWeyv7+FNvXFseCc+6zzrnLzrlH2P65/qVz7lOMd5tvAG+b2Xdmd30EeIkxbnPmLeCDZlbJflc+wvZk0Li3G/Zu47PAJ82saGaPAk8AXzuF9t3DzD4K/DLw48659o6HjqfNJ3zB9MfYnil6A/iV07hou482/hDbXe+/B76R/fkx4BzbkxavZR8XTrute7T/w3x7UmWs2wx8L/B89rP+38D8uLc5a/d/Ar4JvAD8T6A4bu0G/pDta5wDtntTP3O/NgK/kr0vXwF+dIza/Drb1wr9e/F/HGebtXVPRCSjnSoiIhkFoohIRoEoIpJRIIqIZBSIIiIZBaKISEaBKCKS+f95Xdkp7nkYzwAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "scale_percent = 20 #20 percent of original size\n",
    "\n",
    "width = int(imgs_list_jump[0].shape[1] * scale_percent / 100)\n",
    "height = int(imgs_list_jump[0].shape[0] * scale_percent / 100)\n",
    "\n",
    "dim = (width, height)\n",
    "\n",
    "#resize image\n",
    "resized = cv2.resize(imgs_list_jump[0], dim, interpolation = cv2.INTER_AREA)\n",
    "\n",
    "print('Original Dimensions:', imgs_list_jump[0].shape)\n",
    "print('Resized Dimensions:', resized.shape)\n",
    "\n",
    "img = cv2.cvtColor(resized, cv2.COLOR_BGR2RGB)\n",
    "plt.imshow(img)\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Applying to all images"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "(96, 128)\n",
      "(96, 128)\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAUQAAAD7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jrPkkL5n9N5J3J33szDKz68D7gNeARefcMkD69vIplraf3wB+ERjtpnqWa/42YA343fQy/9NmVuZs14xz7i7wa8BtYBmoOef+gjNed+pRNZ6Xn82fBv53+udjqfkkA3G/gyrO7JofM6sAfwz8nHNu57TreRwz+xCw6px747RreQIR8N3Abznn3sfuHvfTvsw8UHrf7cPAc8AzQNnMfup0qzq0M/+zaWa/xO7trM/4h/b5sEPXfJKBeAd4x8j714B7J/j6YzOzmN0w/Ixz7vPpwytmtpQ+vwSsnlZ9+/h+4MfN7C3gD4EfMrPf52zXfAe445x7LX3/c+wG5FmuGeCHgX9yzq055xLg88D3cfbrhkfXeKZ/Ns3sReBDwL9z6fUxx1TzSQbiXwPPm9lzZpZj94boF0/w9cdiu80Bfxu44Zz79ZGnvgi8mP75RXbvLZ4JzrlPOeeuOeeus/vv+n+ccz/F2a75PvAtM/v29KEPAF/lDNecug2838xK6ffKB9idDDrrdcOja/wi8DEzy5vZc8DzwJdPob6HmNkHgf8M/LhzbrR9+vHUfMI3TH+M3ZmibwK/dBo3bceo8QfYHXr/PfB36X8/BsyzO2nx9fTt3GnX+oj6f5C3J1XOdM3APwdeT/+t/xcwe9ZrTuv+r8DXgK8A/xPIn7W6gT9g9x5nwu5o6uOPqxH4pfTn8ibwo2eo5m+we6/Q/yz+j+OsWVv3RERS2qkiIpJSIIqIpBSIIiIpBaKISEqBKCKSUiCKiKQUiCIiqf8PmPMZio5/t1MAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    },
    {
     "data": {
      "text/plain": [
       "True"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "scale_percent = 20 # 20 percent of original size\n",
    "resized_jump_list = []\n",
    "resized_nojump_list = []\n",
    "\n",
    "for img in imgs_list_jump:\n",
    "    width = int(img.shape[1] * scale_percent / 100)\n",
    "    height = int(img.shape[0] * scale_percent / 100)\n",
    "\n",
    "    dim = (width, height)\n",
    "\n",
    "    #resize image\n",
    "    resized = cv2.resize(img, dim, interpolation = cv2.INTER_AREA)\n",
    "    resized_jump_list.append(resized)\n",
    "\n",
    "for img in imgs_list_nojump:\n",
    "    width = int(img.shape[1] * scale_percent / 100)\n",
    "    height = int(img.shape[0] * scale_percent / 100)\n",
    "    \n",
    "    dim = (width, height)\n",
    "    \n",
    "    #resize image\n",
    "    resized = cv2.resize(img, dim, interpolation = cv2.INTER_AREA)\n",
    "    resized_nojump_list.append(resized)\n",
    "\n",
    "#Checking if it worked:\n",
    "print(resized_jump_list[0].shape)\n",
    "print(resized_nojump_list[0].shape)\n",
    "\n",
    "img = cv2.cvtColor(resized_nojump_list[10], cv2.COLOR_BGR2RGB)\n",
    "plt.imshow(img)\n",
    "plt.show()\n",
    "\n",
    "cv2.imwrite('imagem_resized.png', resized_nojump_list[10])"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Creating my X dataset"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "(386, 12288)\n",
      "(81, 12288)\n"
     ]
    }
   ],
   "source": [
    "nojump_list_reshaped = []\n",
    "jump_list_reshaped = []\n",
    "\n",
    "for img in resized_nojump_list:\n",
    "    nojump_list_reshaped.append(img.reshape(-1, img.size))\n",
    "\n",
    "for img in resized_jump_list:\n",
    "    jump_list_reshaped.append(img.reshape(-1, img.size))\n",
    "\n",
    "X_nojump = np.array(nojump_list_reshaped).reshape(len(nojump_list_reshaped), nojump_list_reshaped[0].size)\n",
    "X_jump = np.array(jump_list_reshaped).reshape(len(jump_list_reshaped), jump_list_reshaped[0].size)\n",
    "\n",
    "print(X_nojump.shape)\n",
    "print(X_jump.shape)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Joining both X's"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "(467, 12288)\n"
     ]
    }
   ],
   "source": [
    "X = np.vstack([X_nojump, X_jump])\n",
    "print(X.shape)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Creating my Y dataset"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [],
   "source": [
    "y_nojump = np.array([0 for i in range(len(nojump_list_reshaped))]).reshape(len(nojump_list_reshaped),-1)\n",
    "y_jump = np.array([1 for i in range(len(jump_list_reshaped))]).reshape(len(jump_list_reshaped),-1)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Joining both Y's"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "(467, 1)\n"
     ]
    }
   ],
   "source": [
    "y = np.vstack([y_nojump, y_jump])\n",
    "print(y.shape)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Shuffling both datasets"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [],
   "source": [
    "shuffle_index = np.random.permutation(y.shape[0])\n",
    "#print(shuffle_index)\n",
    "X, y = X[shuffle_index], y[shuffle_index]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Creating a X_train and y_train dataset"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [],
   "source": [
    "X_train = X\n",
    "y_train = y"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Choosing SVM (Support Vector Machine) as our Machine Learning model"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "SVC(kernel='linear')"
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from sklearn.svm import SVC\n",
    "svm_clf = SVC(kernel='linear')\n",
    "svm_clf.fit(X_train, y_train.ravel())"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Creating a confusion matrix to evaluate the model performance"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[381,   5],\n",
       "       [ 16,  65]], dtype=int64)"
      ]
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from sklearn.model_selection import cross_val_predict\n",
    "from sklearn.metrics import confusion_matrix\n",
    "\n",
    "y_train_pred = cross_val_predict(svm_clf, X_train, y_train.ravel(), cv=3) #sgd_clf no primeiro parametro\n",
    "confusion_matrix(y_train.ravel(), y_train_pred)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Saving the model"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "['jump_model.pkl']"
      ]
     },
     "execution_count": 17,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import joblib\n",
    "\n",
    "joblib.dump(svm_clf, 'jump_model.pkl') #sgd_clf no primeiro parametro"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
